package com.shuai.java;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author Jiange
 * @create 2021-04-20-14:49
 */
public interface StudentMapper {
//    @Select("select * from students where sno = #{id}")
    public Student getById(@Param("id") int id);

    public void add(Student student);

    public void delete(String id);

    public List<Student> getAll();

    public Map<String,Object> getReturnMap(String id);

    @MapKey("sno")//告诉封装成map的时候 什么属性作为key
    public Map<Integer,Student> getStuMap();
}
